package com.link2room.blaster.entity;

import com.link2room.common.entity.BaseEntity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by Nakisa on 2016/10/27.
 */
@Entity
@Table(name = "dayu_option", schema = "ark_blaster", catalog = "")
public class DayuOption extends BaseEntity{
    private String appkey;
    private String secret;
    private String url;

    @Basic
    @Column(name = "appkey", nullable = true, length = 16)
    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    @Basic
    @Column(name = "secret", nullable = true, length = 64)
    public String getSecret() {
        return secret;
    }

    public void setSecret(String secret) {
        this.secret = secret;
    }
    @Basic
    @Column(name = "url", nullable = true, length = 128)
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        DayuOption that = (DayuOption) o;

        if (appkey != null ? !appkey.equals(that.appkey) : that.appkey != null) return false;
        if (secret != null ? !secret.equals(that.secret) : that.secret != null) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = appkey != null ? appkey.hashCode() : 0;
        result = 31 * result + (secret != null ? secret.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        return result;
    }
}
